package com.swanclouds.redfish.chassis.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.chassis.Power;

import java.util.List;


/**
 *  * Description:
 *  * Author:      zhangliqiang@asiacom.net.cn
 *  * Date:        2022-07-17 11:26.
 *  
 */
public class PowerModel implements Power {

    /**电源资源的访问路径**/
    @JsonProperty("@odata.id")
    private String dataId;

    /**电源资源模型的OData描述信息**/
    @JsonProperty("@odata.context")
    private String context;

    /**电源资源的类型**/
    @JsonProperty("@odata.type")
    private String type;

    /**电源资源ID**/
    @JsonProperty("Id")
    private String id;

    /**电源资源名称**/
    @JsonProperty("Name")
    private String name;

    /**电源控制信息**/
    @JsonProperty("PowerControl")
    private List<PowerControl> powerControl;

    /**电源模块列表**/
    @JsonProperty("PowerSupplies")
    private List<PowerSupplies> powerSupplies;

    /**电压传感器列表**/
    @JsonProperty("Voltages")
    private List<Voltages> voltages;

    public String getDataId() {
        return this.dataId;
    }

    public String getContext() {
        return this.context;
    }

    public String getType() {
        return this.type;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public List<PowerControl> getPowerControl() {
        return powerControl;
    }

    public List<PowerSupplies> getPowerSupplies() {
        return powerSupplies;
    }

    public List<Voltages> getVoltages() {
        return voltages;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "PowerModel{" +
                ", dataId='" + dataId + '\'' +
                ", context='" + context + '\'' +
                ", type='" + type + '\'' +
                ", Id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", PowerControl='" + powerControl + '\'' +
                ", PowerSupplies='" + powerSupplies + '\'' +
                ", Voltages='" + voltages + '\'' +
                '}';
    }
}
